import request from '@/utils/request'
import Qs from 'qs'

export function listLogAction(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'graded.admin.logAction',
      _mt: 'list',
      ...query
    }
  })
}

export function createLogAction(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'graded.admin.logAction',
      _mt: 'create',
      role: JSON.stringify(data)
    })
  })
}

export function updateLogAction(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'graded.admin.logAction',
      _mt: 'update',
      role: JSON.stringify(data)
    })
  })
}

export function deleteLogAction(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'graded.admin.logAction',
      _mt: 'delete',
      roleId: id
    }
  })
}

